Repository navigation
Add --window: export one photograph through a window chosen elsewhere - #4
Merged
Merged
Conversation
--pick decides a window in the browser and exports it through geometry::plan_window. --window takes the same x,y,w,h in oriented source pixels from the command line, so a crop chosen on a contact sheet exports without opening the page. pick::export now takes the decoded image instead of the browser session's frame, and both paths call it. Checked on the 11-1 cut: 0,811,7728,4046 on a 7728x5152 HIF exports 3072x1608, and 412,773,3091,3091 on a 5152x7728 HIF exports 3072x3072. --window refuses --raw, --pick, --check, --dry-run, --variants and more than one photograph.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--pickchooses a window in the browser and exports it throughgeometry::plan_window.--window x,y,w,htakes the same window in oriented source pixels from the command line, so a crop chosen somewhere else (here, a contact sheet of candidate crops) exports without opening the page.pick::exportnow takes the decoded image rather than the browser session's frame, and both paths call it. The window gets the same checks as a picked one: whole pixels, inside the frame, inside the 3:4 to 1.91:1 band, never enlarged.--windowrefuses--raw,--pick,--check,--dry-run,--variants, and more than one photograph. A RAW never applies here, same as under--pick.Checked
0,811,7728,4046on a 7728x5152 frame exported 3072x1608;412,773,3091,3091and0,2061,5152,5152on 5152x7728 frames exported 3072x3072. Each matched its contact-sheet preview.cargo test --release(78 pass, including a newparse_windowtest),cargo clippy --all-targets --locked -- -D warningsandcargo fmt --checkare clean.